package cn.ly.stack;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class ReverserApp {
	
	public static void main(String[] args) throws IOException {
		String input,output;
		while(true){
			System.out.println("input string:");
			System.out.flush();
			input = getInput();
			if(input.equals("")) break;
			output = new Reverser(input).doRev();
			System.out.println(output);
		}
	}
	
	public static String getInput() throws IOException{
		InputStreamReader reader = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(reader);
		String s = br.readLine();
		//br.close();
		return s;
	}

}
